export function commonElements(array1: any[], array2: any[]): any[] {
  return array1
    .filter((element) => array2.includes(element))
    .map((element) => element);
}
